package com.netistate.pojo;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="t_device")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Device {
	
	private int id;
	private String manuDate;
	private String model;
	private int state;
	private String bsmVersion;
	private String devIp;
	private String devMask;
	private String devGateway;
	private String createtime;
	private String devAddress;
	private int orders;
	private int nodes;
	private String module;
	private String licenseExprie;
	private String hardwareSource;
	private String devConfig;
	private String workNote;
	private int isDemoOrProduct;
	
	private Project project;
	
	private Set<License> licenseSet;
	private Set<Devhistory> devhistorySet;
	
	@OneToMany(mappedBy="device")
	public Set<License> getLicenseSet() {
		return licenseSet;
	}
	public void setLicenseSet(Set<License> licenseSet) {
		this.licenseSet = licenseSet;
	}
	
	@OneToMany(mappedBy="device")
	public Set<Devhistory> getDevhistorySet() {
		return devhistorySet;
	}
	public void setDevhistorySet(Set<Devhistory> devhistorySet) {
		this.devhistorySet = devhistorySet;
	}
	
	
	@ManyToOne
	@JoinColumn(name="projectid")
	public Project getProject() {
		return project;
	}
	public void setProject(Project project) {
		this.project = project;
	}
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getManuDate() {
		return manuDate;
	}
	public void setManuDate(String manuDate) {
		this.manuDate = manuDate;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public String getBsmVersion() {
		return bsmVersion;
	}
	public void setBsmVersion(String bsmVersion) {
		this.bsmVersion = bsmVersion;
	}
	public String getDevIp() {
		return devIp;
	}
	public void setDevIp(String devIp) {
		this.devIp = devIp;
	}
	public String getDevMask() {
		return devMask;
	}
	public void setDevMask(String devMask) {
		this.devMask = devMask;
	}
	public String getDevGateway() {
		return devGateway;
	}
	public void setDevGateway(String devGateway) {
		this.devGateway = devGateway;
	}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	public String getDevAddress() {
		return devAddress;
	}
	public void setDevAddress(String devAddress) {
		this.devAddress = devAddress;
	}
	public int getOrders() {
		return orders;
	}
	public void setOrders(int orders) {
		this.orders = orders;
	}
	public int getNodes() {
		return nodes;
	}
	public void setNodes(int nodes) {
		this.nodes = nodes;
	}
	public String getModule() {
		return module;
	}
	public void setModule(String module) {
		this.module = module;
	}
	public String getLicenseExprie() {
		return licenseExprie;
	}
	public void setLicenseExprie(String licenseExprie) {
		this.licenseExprie = licenseExprie;
	}
	public String getHardwareSource() {
		return hardwareSource;
	}
	public void setHardwareSource(String hardwareSource) {
		this.hardwareSource = hardwareSource;
	}
	public String getDevConfig() {
		return devConfig;
	}
	public void setDevConfig(String devConfig) {
		this.devConfig = devConfig;
	}
	public String getWorkNote() {
		return workNote;
	}
	public void setWorkNote(String workNote) {
		this.workNote = workNote;
	}
	public int getIsDemoOrProduct() {
		return isDemoOrProduct;
	}
	public void setIsDemoOrProduct(int isDemoOrProduct) {
		this.isDemoOrProduct = isDemoOrProduct;
	}
	

	
	
	

}
